package routers

import (
	"gin-project-01/gin-step02/gin08-middleware/controllers/car"
	middlewares2 "gin-project-01/gin-step02/gin08-middleware/middlewares"
	"github.com/gin-gonic/gin"
)

// CarRouters
//
//	@Description: 路由分组
//	@param r
func CarRouters(r *gin.Engine) {
	//路由分组中间件使用方式一
	routers := r.Group("/car", middlewares2.SaveAccessLog, middlewares2.CarMiddleWare01, middlewares2.CarMiddleWare02)

	{

		//使用自定义控制器
		routers.GET("/", car.Index)

		routers.GET("/get", car.Detail)

		routers.GET("/del", car.Del)
	}
}
